from fastapi import APIRouter, Depends

from forward.api.h5.schemas.admin import AdminAddInSchema
from forward.api.h5.service.admin import AdminService
from forward.dependencies.verify import h5_admin_verify
from forward.extend.pydantic.result_api import ResultAPI

router = APIRouter(prefix="/admin")


@router.post(
    "/add",
)
async def add(add_in: AdminAddInSchema, admin_service: AdminService = Depends()):
    """添加管理员"""
    result = await admin_service.add(add_in)
    return ResultAPI(data=result)
